package me.xiaoyan.java.chapter13;

import java.util.Scanner;

/**
 * 人物类
 * @author keley
 * @version 1.0.1
 * @datetime 20140819
 */
public class Person {
	/**
	 * 任务姓名
	 */
	String name;
	
	/**
	 * 任务积分
	 */
	int score;
	
	/**
	 * 用户出拳
	 * @return 返回用户出拳编号
	 */
	public int showFist()
	{
		Scanner input = new Scanner(System.in);
		System.out.println("请出拳 1.剪刀 2.石头 3.布(请选择相应数字):");
		int choice = input.nextInt();
		String fist = name + "出拳:";
		switch (choice) {
		case 1:
			fist = fist + "剪刀";
			break;
		case 2:
			fist = fist + "石头";
			break;
		default:
			fist = fist + "布";
			break;
		}
		System.out.println(fist);
		return choice;
	}
}
